//
//  JLServiceWebViewController.m
//  JiuLe
//
//  Created by xcq on 15/12/14.
//  Copyright © 2015年 Fine. All rights reserved.
//

#import "JLServiceWebViewController.h"

@interface JLServiceWebViewController () <UIWebViewDelegate>
@property (weak, nonatomic) IBOutlet UIImageView *developerImg;

@end

@implementation JLServiceWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"挂号";
    [self showNavBarWithRightTitle:nil
                    andRightAction:nil
                     andLeftAction:@selector(backTo)
                 andRightBtnIsShow:NO];
    if (_isDeveloper) {
        _developerImg.hidden = NO;
        _webView.hidden = YES;
    } else {
        
        NSMutableURLRequest *request = [[NSMutableURLRequest alloc]
                                        initWithURL:[NSURL URLWithString:@"http://www.haoyicn.cn/mobile_guahaoHospitalList.html"]
                                        cachePolicy:NSURLRequestUseProtocolCachePolicy
                                        timeoutInterval:15.f];
        [_webView loadRequest:request];
    }
}

- (void)viewWillAppear:(BOOL)animated {
    [self.navigationController setHidesBottomBarWhenPushed:YES];
}

- (void)viewDidDisappear:(BOOL)animated {
    [self.navigationController setHidesBottomBarWhenPushed:NO];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)webViewDidStartLoad:(UIWebView *)webView {
    [SVProgressHUD showWithStatus:@"加载中.." maskType:SVProgressHUDMaskTypeClear];
}

- (void)webViewDidFinishLoad:(UIWebView *)webView {
    [SVProgressHUD dismiss];
}
@end
